<?php

if($sf_user->hasFlash('signup_form_valid'))
{
    
  echo _tag('p.form_valid', __('Congratulation Dear <br />
      You Have Been enrolled as one of our valued Prime members.'));
}
if(!$sf_user->isAuthenticated()) {

    ?>
<div class="signupform" >
    <?php
        echo $form->open('.dm_register_form');
        echo $form->renderHiddenFields();
//        echo $form->renderGlobalErrors();
        ?>
    <div style="float: left;">
        <label >User Name :</label>
    <?php echo $form['username']->renderError()?>
            <?php echo $form['username']->render(array('class'=>'full'))?>
    </div>
    <div style="width:40%; float: left;">
        <label >Password :</label>
    <?php echo $form['password']->renderError()?>
            <?php echo $form['password']->render(array('class'=>'small'))?>
    </div>
    <div style="width:60%; float: left;">
        <label >Password Again :</label>
    <?php echo $form['password_again']->renderError()?>
            <?php echo $form['password_again']->render(array('class'=>'half'))?>
    </div>
    <div style="width:70%; float: left;">
        <label>Title</label>
        <input type="radio" checked="checked" id="dm_user_form_Profile_title_Mr" value="Mr" name="dm_user_form[Profile][title]">
        <label >Mr.</label>
        <input type="radio" id="dm_user_form_Profile_title_Mss" value="Mss" name="dm_user_form[Profile][title]">
        <label >Mrs.</label>
    </div>
    <div style="width:60%; float: left;">
        <label >First Name :</label>
    <?php echo $form['Profile']['first_name']->renderError()?>
            <?php echo $form['Profile']['first_name']->render(array('class'=>'half'))?>
    </div>
    <div style="width:40%; float: left;">
        <label >Nick Name :</label>
    <?php echo $form['Profile']['nick_name']->renderError()?>
            <?php echo $form['Profile']['nick_name']->render(array('class'=>'small'))?>
    </div>
    <div style="float: left;">
        <label >Full Name :</label>
    <?php echo $form['Profile']['last_name']->renderError()?>
            <?php echo $form['Profile']['last_name']->render(array('class'=>'full'))?>
    </div>
    <div style="width:60%; float: left;">
        <label >Cell No. :</label>
    <?php echo $form['Profile']['phone_no']->renderError()?>
            <?php echo $form['Profile']['phone_no']->render(array('class'=>'medium'))?>
    </div>
    <div style="width:40%; float: left;">
        <label >Cell No.2 :</label>
    <?php echo $form['Profile']['phone_no1']->renderError()?>
            <?php echo $form['Profile']['phone_no1']->render(array('class'=>'small'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Land Phone No. :</label>
    <?php echo $form['Profile']['land_phone_no']->renderError()?>
            <?php echo $form['Profile']['land_phone_no']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Email :</label>
    <?php echo $form['email']->field('.half')->error()?>
    </div>
    <div style="width:100%; float: left;">
        <label >Address :</label>
    <?php echo $form['Profile']['street_address1']->renderError()?>
            <?php echo $form['Profile']['street_address1']->render(array('class'=>'full'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >City :</label>
    <?php echo $form['Profile']['city']->renderError()?>
            <?php echo $form['Profile']['city']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >ZIP/Postal Code :</label>
    <?php echo $form['Profile']['post_code']->renderError()?>
            <?php echo $form['Profile']['post_code']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >State :</label>
    <?php echo $form['Profile']['state']->renderError()?>
            <?php echo $form['Profile']['state']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Country :</label>
    <?php echo $form['Profile']['country']->renderError()?>
            <?php echo $form['Profile']['country']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label style="width:310px;" >Message (max 150 characters)</label>
    </div>
    <div style="width:50%; float: left;">
    <?php echo $form['Profile']['message']->renderError()?>
        <textarea class="half" name="dm_user_form[Profile][message]"></textarea>
    </div>
    <div style="width:100%; float: left;">
        <label >Delivary Address:</label>
    <?php echo $form['Profile']['shipping_address1']->renderError()?>
            <?php echo $form['Profile']['shipping_address1']->render(array('class'=>'full'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >City :</label>
    <?php echo $form['Profile']['shipping_city']->renderError()?>
            <?php echo $form['Profile']['shipping_city']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >ZIP/Postal Code :</label>
    <?php echo $form['Profile']['shipping_post_code']->renderError()?>
            <?php echo $form['Profile']['shipping_post_code']->render(array('class'=>'half'))?>
    </div>

    <div style="width:50%; float: left;">
        <label >Country :</label>
    <?php echo $form['Profile']['shipping_country']->renderError()?>
            <?php echo $form['Profile']['shipping_country']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Contact Person at Delivary Address :</label>
    <?php echo $form['Profile']['contact_person']->renderError()?>
            <?php echo $form['Profile']['contact_person']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Cell no. at Delivary Address :</label>
    <?php echo $form['Profile']['contact_phone']->renderError()?>
            <?php echo $form['Profile']['contact_phone']->render(array('class'=>'half'))?>
    </div>
    <div style="width:50%; float: left;">
        <label >Delivary Date & Time :</label>
    <?php echo $form['Profile']['delivery_time']->renderError()?>
            <?php echo $form['Profile']['delivery_time']->render(array('class'=>'half'))?>
    </div>
    <div style="">
        <label >Terms and Conditions :</label>
    <?php echo $form['Profile']['terms']->renderError()?>
            <?php echo $form['Profile']['terms']->render(array('class'=>'half'))?>
    </div>
    <div style="text-align: center; padding: 10px;">
        <input value="Proceed" class="button" type= "submit" name="Proceed" />
        <input onclick="window.location = '<?php echo $sf_request->getReferer()?>'" value="Cancel"  class="button" type= "button" name="Cancel" />
    </div>
    <?php echo $form->close();?>
</div>
    <?php

}